package com.netease.nie.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.netease.nie.model.DrawLotteryParticipationRecord;

/**
 * 抽奖记录业务自定义操作
 * @author gzlibingjie
 */
public interface DrawLotteryParticipationRecordMapper {
	
	/**
	 * 插入一条抽奖记录
	 * @param drawLotteryParticipationRecord 要保存的抽奖记录
	 * @return 影响的行数
	 */
	public int insert(@Param("drawLotteryParticipationRecord") DrawLotteryParticipationRecord drawLotteryParticipationRecord);
	
	/**
	 * 获取近N次抽奖记录
	 * @param userId 用户ID
	 * @param drawLotteryActivityId 抽奖活动ID
	 * @param minimumTimes 近N次
	 * @return 抽奖记录列表
	 */
	public List<DrawLotteryParticipationRecord> queryLast(@Param("userId") Long userId, @Param("drawLotteryActivityId") Integer drawLotteryActivityId, @Param("minimumTimes") Integer minimumTimes);

}
